<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8" />
	<title>Document</title>
	<link type="text/css" rel="stylesheet" href="__PUBLIC__/Admin/css/style.css" />
	<script type="text/javascript" src="__PUBLIC__/Admin/js/jquery-1.8.3.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/Admin/js/menu.js"></script>
	<style type="text/css">
		#addform{
			
			margin: 15px auto 10px auto;
		}
		table{
			width: 100%;
			text-align: center;
			margin-left: auto;
			margin-right: auto;
		}
		table th{
			background-color: #11B6B6;
			color: white;
			font-family: "微软雅黑";
		}
		#pageinfo{
			margin: 15px auto;
			text-align: center;
		}
		#dotop{
			width: 400px;
			background: white;
			height: 150px;
			border: solid 3px #DDDDDD;
			position: absolute;
			top: 25%;
			left: 25%;
			display: none;
			
		}
		#dotop p{
			margin-top: 40px;
			margin-left: 20px;
		}
		#spanX{
			position: absolute;
			top: 2px;
			right: 3px;
		}
	</style>
</head>
<body>
	<div class="right-nav">
          <ul>
              <li><img src="__PUBLIC__/Admin/images/home.png"></li>
                <li style="margin-left:25px;">您当前的位置：</li>
                <li><a href="__MODULE__/Index/index">内容管理</a></li>
                <li>></li>
                <li><a href="__MODULE__/Info/index">供求信息管理</a></li>
            </ul>
      </div>
	<div id="addform">
		<form action="__URL__/index" method="get">
			
				<span>置顶:</span><input type="checkbox" name="is_top" value="1" />　
				<span>审核:</span><input type="checkbox" name="is_varify" value="1" />　
				<span>是否过期:</span>
				<input type="radio" name="is_overtime"  value="1" />是
				<input type="radio" name="is_overtime"  value="0" />否　
				<select name="area_id">
					<option value="">请选择</option>
					<foreach name="areas" item="area">
						<option value="{$area.id}">{$area.area_name}</option>
					</foreach>
				</select>
				<span>标题模糊查询: </span><input type="text" name="keyword"/>
				<input type="submit" value="查找" />
		</form>
	</div>
	
	<table id="tab" >
		<tr><th width="30%">消息标题</th>
			<th>发布人</th>
			<th>地区</th>
			<th>价格(¥)</th>
			<th>发布时间</th>
			<th>图片数量</th>
			<th>浏览次数</th>
			<th>是否审核</th>
			<th>是否过期</th>
			<th>设置置顶</th>
			<th>删除</th>
		</tr>
		
		<foreach name="infos" item="info" >
		<tr>
			<td><a title="{$info.info_content}" href="#">{$info.info_title}</a></td>
			<td>{$info.user_name}</td>
			<td>{$info.area_name}</td>
			<td>{$info.info_price}</td>
			<td>{$info.info_createtime}</td>
			<td>{$info.img_num}</td>
			<td>{$info.info_num}</td>
			<td>
				<if condition="$info.is_varify eq 0"> <a href="__URL__/dovarify/info_id/{$info.info_id}" onclick="JavaScript:return confirm('确认要审核吗?')">审核</a>
				<else /><img src="__PUBLIC__/Admin/images/yes.gif" alt="">
				</if>
			</td>
			<td><img src="__PUBLIC__/Admin/images/{$info.is_overtime}.gif" alt=""></td>
			<td>
				<if condition="$info.is_top eq 0"> <a href="JavaScript:;" onclick="dotop('{$info.info_id}','{$info.info_title}')">置顶</a>
				<else /><a title="{$info.top_overtime}" href="__URL__/cleartop/info_id/{$info.info_id}" onclick="return confirm('确认要取消置顶吗?')">取消置顶</a>
				</if>
			</td>
			
			
			<td><a href="__URL__/delete/id/{$info.info_id}" onclick="JavaScript:return confirm('确认要删除吗?')">删除</a></td>
		</tr>
		</foreach>
	</table>
	<div id="dotop">
		<form action="__URL__/dotop" method="post">
			<p><span>置顶标题:</span>
				<input type="text" id="updatainput" name="info_title" readonly="readonly"/><br />
				<span>置顶天数:</span>
				<input type="number" id="top_overtime" name="top_overtime" style="width: 50px;"/>天
				<input type="hidden" id="infoid" name="info_id"value="" />
				<input type="submit" value="置顶" />
			</p>
		<span id="spanX"><a href="JavaScript:;">×</a></span>
	</form>
	</div>
	<p id="pageinfo">{$pageinfo}</p>
	<script type="text/javascript">
		function dotop(id,info_title){
			document.getElementById("dotop").style.display="block";
			document.getElementById("infoid").value=id;
			document.getElementById("updatainput").value=info_title;
		}
		var closewind=document.getElementById("spanX");
		closewind.onclick=function(){
			document.getElementById("dotop").style.display="none";
		}
	</script>
	
</body>
</html>